//
//  CmsScrollView.h
//  Brand
//
//  Created by Faker on 4/29/14.
//  Copyright (c) 2014 Faker. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol CmsScrollViewDelegate,CmsScrollViewDataSource;

@interface CmsScrollView : UIView <UIScrollViewDelegate>


@property (strong, nonatomic) UIScrollView* topScrollView;
@property (strong, nonatomic) UIScrollView* bottomScrollView;

@property (assign, nonatomic) int totalPages;
@property (assign, nonatomic) int curPage;
@property (strong, nonatomic) NSMutableArray* topViews;

@property (weak, nonatomic) id<CmsScrollViewDelegate> delegate;
@property (weak, nonatomic) id<CmsScrollViewDataSource> dataSource;

-(void)reloadData;

@end

@protocol CmsScrollViewDataSource <NSObject>

-(NSInteger)numberOfPages; //有几页
-(UIView*)pageAtIndex:(int)index;

@end

@protocol CmsScrollViewDelegate <NSObject>

-(void)cmsScrollView:(CmsScrollView*)cmsScrollView didSelectItemAtIndex:(int)index; //点击某一页

@end
